package com.cuoyi.coupon.mall.common;

/**
 * @author zhang.cheng
 * 2022/3/18 11:35 PM
 */
public class BusinessException extends RuntimeException {
    private final Integer code;

    public BusinessException(Integer code) {
        this.code = code;
    }

    public BusinessException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    public BusinessException(Integer code, Throwable cause) {
        super(cause);
        this.code = code;
    }

    public BusinessException(Integer code, String message, Throwable cause) {
        super(message, cause);
        this.code = code;
    }

    public Integer getCode() {
        return this.code;
    }
}
